<html xmlns:th="http://www.thymeleaf.org">
<div class="bjui-pageHeader" style="background-color:#fefefe; border-bottom:none;">
    <form data-toggle="ajaxsearch"
          data-options="{searchDatagrid:$.CurrentNavtab.find('#datagrid-businessSendTask-filter')}">
        <div class="bjui-searchBar">
            <label>状态</label>
            <select name="state" data-toggle="selectpicker" id="select_businessSendTask_state">
            </select>

            <button type="submit" class="btn-green" data-icon="search">搜索</button>
            <button type="reset" class="btn-orange" data-icon="times" onclick="resetAll();">重置</button>

            <div class="bjui-moreSearch" style="top: 27px; display: none;">
            </div>
        </div>
    </form>
</div>
<div class="bjui-pageContent">
    <table class="table table-bordered" id="datagrid-businessSendTask-filter" data-toggle="datagrid" data-options="{
        height: '100%',
        showToolbar: true,
        toolbarItem: 'refresh,|,del',
        dataUrl: '/admin/sendtask',
        dataType: 'json',
        jsonPrefix: '',
        editMode: {dialog:{width:'800',height:500,title:'编辑信息',mask:true}},
        editUrl: '/admin/sendtask/initpage?req_id={id}',
        delUrl:'/admin/sendtask/del',
        delPK:'id',
        delConfirm:true,
        showCheckboxcol: true,
        inlineEditMult:false,
        paging: {pageSize:20},
        linenumberAll: true,
        filterThead:false,
        hScrollbar:false
    }">
        <thead>
        <tr>
            <th data-options="{name:'id',align:'center',width:100,render:details}">详情</th>
            <th data-options="{name:'totalNum',align:'center',width:100}">总数量</th>
            <th data-options="{name:'succNum',align:'center',width:100}">成功数量</th>
            <th data-options="{name:'errorNum',align:'center',width:100}">异常数量</th>
            <th data-options="{name:'dealNum',align:'center',width:100}">处理数量</th>
            <th data-options="{name:'state',align:'center',width:100}">状态</th>
            <th data-options="{name:'remark',align:'center',width:100}">备注</th>
            <th data-options="{name:'updatedTime',align:'center',width:300}">更新时间</th>
        </tr>
        </thead>
    </table>
</div>

<script type="text/javascript">
    select_option('select_businessSendTask_state', 'com.imessage.type.BusinessTaskState');
    function details(value) {
        var html="";
        html+="<button type=\"button\" class=\"btn-green\" data-toggle=\"navtab\" data-options=\"{id:'addetail', url:'/admin/sendtask/initdetail?id="+value+"', title:'详情'}\">详情</button>";
        return html;
    }
</script>